package afteradvice;

public class BookServiceImpl implements BookSrevice{
    @Override
    public String query(String name) {
        System.out.println("开启事务");
        System.out.println("===2===调用DAO "+name);
        //System.out.println("关闭事务");

        try {
            int i=10;

            i=i/0;
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("数据计算错误");
        }

        return name;
    }
}
